1. Technical Field
The inventive concept relates to a data storage device and, more particularly, to a data storage device capable of improving operation performance by optimizing internal operations and an operating method thereof.
2. Related Art
In recent years, the paradigm of the computing environment has changed to ubiquitous computing where computer systems can be used anytime anywhere. Therefore, the use of portable electronic devices such as portable phones, digital cameras, and laptop computers has rapidly increased. Data storage devices using memory devices are generally used in portable electronic devices. Data storage devices are used as main memory devices or auxiliary memory devices of portable electronic devices.
Data storage devices using memory devices have no moving parts, and therefore have good stability, durability, high information access rates, and low power consumption. Data storage devices having such advantages include universal serial bus (USB) memory devices, memory cards having various interfaces, and solid state drives (hereinafter, referred to as SSDs).
As large data files such as music and videos are stored in portable electronic devices, the data storage devices need to be large. The data storage devices may include a memory device having highly integrated memory cells, for example, a flash memory device.
Flash memory devices do not support data overwrite due to structural characteristics. That is, it is impossible to update invalid data of programmed memory cells to other valid data. Therefore an erase operation has to be performed to the programmed memory cells in advance. This process is referred to as an “erase-before-program” operation. That is, before the valid data is programmed in currently programmed memory cells of the flash memory device, the currently programmed memory cells have to be returned to an initial state or an erased state prior to being programmed again.
However, it takes long time to perform an erase operation in the flash memory device. Thus, a controller of the data storage device does not perform an erase operation directly on the programmed memory cells. Instead, the controller of the data storage device programs the valid data into the memory cells that have been erased.
Through the above-described operation of the controller in the data storage device, the flash memory device stores both valid data and invalid data. In some cases, the controller of the data storage device performs a merging process during which valid data are collected into a concentrated region, and the invalid data are erased.